<?php 
$sqlquery = <<<EOT
DROP TABLE IF EXISTS `prefix_special`;
CREATE TABLE `prefix_special` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `aid` int(10) unsigned NOT NULL DEFAULT '0',
  `title` char(60) NOT NULL,
  `thumb` char(100) NOT NULL,
  `banner` char(100) NOT NULL,
  `description` char(255) NOT NULL,
  `url` char(100) NOT NULL,
  `ishtml` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `ispage` tinyint(1) unsigned NOT NULL,
  `filename` char(40) NOT NULL,
  `pics` char(100) NOT NULL,
  `voteid` char(60) NOT NULL,
  `style` char(20) NOT NULL,
  `index_template` char(40) NOT NULL,
  `list_template` char(40) NOT NULL,
  `show_template` char(60) NOT NULL,
  `css` text NOT NULL,
  `username` char(40) NOT NULL,
  `userid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `createtime` int(10) unsigned NOT NULL DEFAULT '0',
  `listorder` smallint(5) unsigned NOT NULL,
  `elite` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `disabled` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `disabled` (`disabled`)
) TYPE=MyISAM;

DROP TABLE IF EXISTS `prefix_special_c_data`;
CREATE TABLE `tp_special_c_data` (
  `id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `author` varchar(40) NOT NULL,
  `content` text NOT NULL,
  `paginationtype` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `maxcharperpage` mediumint(6) unsigned NOT NULL DEFAULT '0',
  `style` char(20) NOT NULL,
  `show_template` varchar(30) NOT NULL,
  UNIQUE KEY `id` (`id`)
) TYPE=MyISAM;

DROP TABLE IF EXISTS `prefix_special_content`;
CREATE TABLE `tp_special_content` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `specialid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `title` char(80) NOT NULL,
  `style` char(24) NOT NULL,
  `typeid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `thumb` char(100) NOT NULL,
  `keywords` char(40) NOT NULL,
  `description` char(255) NOT NULL,
  `url` char(100) NOT NULL,
  `curl` char(15) NOT NULL,
  `listorder` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `userid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `username` char(20) NOT NULL,
  `inputtime` int(10) unsigned NOT NULL DEFAULT '0',
  `updatetime` int(10) unsigned NOT NULL DEFAULT '0',
  `searchid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `islink` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isdata` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `specialid` (`specialid`,`typeid`,`isdata`),
  KEY `typeid` (`typeid`,`isdata`)
) TYPE=MyISAM;
EOT;
$menuid = D('Node')->add(array('parentid'=> 34, 'name' => '专题', 'm' => $this->module, 'c' => $this->module, 'a' => 'init'));
D('Node')->add(array('parentid' => $menuid, 'name' => '添加专题','m' => $this->module, 'c'=> $this->module, 'a'=> 'add'));
D('Node')->add(array('parentid' => $menuid, 'name' => '编辑专题','m' => $this->module, 'c'=> $this->module, 'a'=> 'edit', 'display' => '0'));
D('Node')->add(array('parentid' => $menuid, 'name' => '删除专题','m' => $this->module, 'c'=> $this->module, 'a'=> 'delete', 'display' => '0'));
D('Node')->add(array('parentid' => $menuid, 'name' => '专题推荐','m' => $this->module, 'c'=> $this->module, 'a'=> 'elite', 'display' => '0'));
D('Node')->add(array('parentid' => $menuid, 'name' => '导入信息','m' => $this->module, 'c'=> $this->module, 'a'=> 'import', 'display' => '0'));
/* 内容相关菜单 */
D('Node')->add(array('parentid' => $menuid, 'name' => '内容管理','m' => $this->module, 'c'=> 'Content', 'a'=> 'delete', 'display' => '0'));